package com.spring.service;

import com.spring.annotation.Autowired;
import com.spring.annotation.Component;
import com.spring.annotation.Scope;

/**
 * @ClassName UserService
 * @Description TODO:手写模拟spring源码——第1步：A、定义一个bean对象 userService
 * @Author lindipei
 * @Date 2023/10/19 16:59
 */
@Component("userService")//TODO: B、业务类名称叫userService
@Scope("prototype")//改为多例对象
public class UserService {

    @Autowired
    private OrderService orderService;

    public void test(){
        System.out.println("orderService对象--"+orderService);
    }
}
